package com.atguigu.gmall.item.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.item.client.impl.ItemDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

/**
 * @author Fxz
 * @version 1.0
 * @date 2022-02-08 10:47
 */
@FeignClient(value = "service-item", fallbackFactory = ItemDegradeFeignClient.class)
public interface ItemFeignClient {

	/**
	 * 获取sku信息
	 */
	@GetMapping("/api/item/{skuId}")
	public Result<Map<String, Object>> getItemById(@PathVariable Long skuId);

}
